package br.urca.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "historico")
public class Historico implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@EmbeddedId
	private HistoricoPK id;
	
	@Column(name = "cdped", columnDefinition = "CHAR(5)")
	private String pedido;
	
	@Column(name = "aval1")
	private Double notaAV1;
	
	@Column(name = "aval2")
	private Double notaAV2;
	
	@Column(name = "avfin")
	private Double notaAVF;
	
	@Column(name = "notaa")
	private Double nota;
	
	@ManyToOne
	@JoinColumn(name = "resul")
	private SituacaoDisciplina situacao;
	
	@Column(name = "ttpre")
	private Integer ttpre;
	
	@Column(name = "ttaus")
	private Integer ttaus;
	
	@Column(name = "credi")
	private Integer creditos;
	
	public Historico() { }

	public Historico(HistoricoPK id, String pedido, Double notaAV1,
			Double notaAV2, Double notaAVF, Double nota, SituacaoDisciplina situacao,
			Integer ttpre, Integer ttaus, Integer creditos) {
		super();
		this.id = id;
		this.pedido = pedido;
		this.notaAV1 = notaAV1;
		this.notaAV2 = notaAV2;
		this.notaAVF = notaAVF;
		this.nota = nota;
		this.situacao = situacao;
		this.ttpre = ttpre;
		this.ttaus = ttaus;
		this.creditos = creditos;
	}

	public HistoricoPK getId() {
		return id;
	}

	public void setId(HistoricoPK id) {
		this.id = id;
	}

	public String getPedido() {
		return pedido;
	}

	public void setPedido(String pedido) {
		this.pedido = pedido;
	}

	public Double getNotaAV1() {
		return notaAV1;
	}

	public void setNotaAV1(Double notaAV1) {
		this.notaAV1 = notaAV1;
	}

	public Double getNotaAV2() {
		return notaAV2;
	}

	public void setNotaAV2(Double notaAV2) {
		this.notaAV2 = notaAV2;
	}

	public Double getNotaAVF() {
		return notaAVF;
	}

	public void setNotaAVF(Double notaAVF) {
		this.notaAVF = notaAVF;
	}

	public Double getNota() {
		return nota;
	}

	public void setNota(Double nota) {
		this.nota = nota;
	}

	public SituacaoDisciplina getSituacao() {
		return situacao;
	}

	public void setSituacao(SituacaoDisciplina situacao) {
		this.situacao = situacao;
	}

	public Integer getTtpre() {
		return ttpre;
	}

	public void setTtpre(Integer ttpre) {
		this.ttpre = ttpre;
	}

	public Integer getTtaus() {
		return ttaus;
	}

	public void setTtaus(Integer ttaus) {
		this.ttaus = ttaus;
	}

	public Integer getCreditos() {
		return creditos;
	}

	public void setCreditos(Integer creditos) {
		this.creditos = creditos;
	}
	
}
